ATSUTextDeleted

Indicates the location in physical memory of deleted text.

OSStatus ATSUTextDeleted (
                     ATSUTextLayout iTextLayout,
                     UniCharArrayOffset iDeletedRangeStart,
                     UniCharCount iDeletedRangeLength);
iTextLayout
A reference of type ATSUTextLayout. Pass a reference to an initialized text layout object. You cannot pass NULL for this parameter.

iDeletedRangeStart
A value of type UniCharArrayOffset. Pass the edge offset corresponding to the beginning of the deleted text. You may pass a value outside the range of text being operated on if the deletion occurs outside the range. To indicate the beginning of the text buffer, pass the constant kATSUFromTextBeginning, described in Text Offset Constant. To indicate the entire text buffer, pass kATSUFromTextBeginning in this parameter and the constant kATSUToTextEnd in the iDeletedRangeLength parameter. If the offset is outside the text buffer, ATSUTextDeleted returns the result code kATSUInvalidTextRangeErr.

iDeletedRangeLength
A value of type UniCharCount. Pass the length of the deleted text. To indicate the end of the text buffer, pass the constant kATSUToTextEnd, described in Text Length Constant. To indicate the entire text buffer, pass kATSUToTextEnd in this parameter and the constant kATSUFromTextBeginning in the iDeletedRangeStart parameter. If the range is outside the text buffer, ATSUTextDeleted returns the result code kATSUInvalidTextRangeErr.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUTextDeleted function shortens or removes the style run containing the deletion point and the total length of the text range by the amount of the text deletion. If the deletion point is between two style runs, the first style run is removed. It also removes any soft line breaks that fall within the deleted text. ATSUTextDeleted then updates drawing caches.

ATSUTextDeleted does not change the memory location or the edge offset of the text. It shifts the text after the deleted text by the appropriate offset (iDeletedRangeStart +iDeletedRangeLength).

You are responsible for making sure that the corresponding text is deleted from the text buffer. You are also responsible for disposing of the memory associated with style runs that have been removed by calling the function ATSUDisposeStyle.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)